NDepend.API Documentation
ParentTypes(IEnumerable<IType>) Method
NDepend.CodeModel Namespace > ExtensionMethodsProjection Class > ParentTypes Method : ParentTypes(IEnumerable<IType>) Method
This sequence of IType objects.
Returns a sequence of IType objects made of parent types of types in types that are nested in parent types.
Syntax
[Extension()]
public static IEnumerable<IType> ParentTypes( 
   IEnumerable<IType> types
)

Parameters

types
This sequence of IType objects.
Remarks
If a type is nested in a type nested in a type, both parent types are returned. Notice that for third-party nested types, the property IType.IsNested is set to true, but the parent/nested relation represented by IType.NestedTypes and IMember.IMember.ParentType is not resolved. Hence this extension method only works for application types, not for third-party types.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsProjection Class
ExtensionMethodsProjection Members
Overload List
NestedTypes Property